package booking

import (
	"car-thirdparty-api/api/booking/v1"
	"car-thirdparty-api/internal/service"
	"context"
)

func (c *ControllerV1) BookingAdd(ctx context.Context, req *v1.BookingAddReq) (res *v1.BookingAddRes, err error) {
	addRes, err := service.BookingV1().BookingAdd(ctx, req.BookingAddReq)
	if err != nil {
		return nil, err
	}

	res = &v1.BookingAddRes{
		BookingAddRes: addRes,
	}

	return
}
